const express = require('express')
    // 创建路由对象
const router = express.Router()
    // 导入用户路由处理函数模块
const OrderListHandler = require('../router_handler/order')

const { reg_order_schema } = require('../schema/manager')
const expressJoi = require('@escook/express-joi')

router.get('/orders', OrderListHandler.getOrdersList)

//根据用户id查询用户信息
router.get('/orders/:id', OrderListHandler.searchOrderById)

//编辑用户
router.put("/orders/:id", expressJoi(reg_order_schema), OrderListHandler.editOrderById)



module.exports = router